"""Detect when code is running under the dev appserver and not in production.

Handy for when you want to only have certain debug features when testing
locally, e.g. the DEBUG value in Django's setting.py.

"""

SERVER_SOFTWARE = os.environ.get('SERVER_SOFTWARE')
if SERVER_SOFTWARE is None:
    DEBUG = True
elif SERVER_SOFTWARE.startswith('Dev'):
    DEBUG = True
else:
    DEBUG = False
del SERVER_SOFTWARE
